<template>
  <div class="dy-main InsuranceOrderHistoryQuery">
    <div class="dy-header">
       <x-header :right-options="{showMore: false}" :left-options="{preventGoBack:true}" @on-click-back="back">交易查询</x-header>
    </div>
    <div class="dy-body">
      <div class="dltable">
        <group gutter="0">
          <cell :title="('序号')" :value="NumericalOrder"></cell>
          <cell :title="('产品名称')" :value="RiskName"></cell>
          <cell :title="('保单号')" :value="InsuranceNumber"></cell>
          <cell :title="('投保公司')" :value="InsuranceCompany"></cell>
          <cell :title="('投保日期')" :value="InsuranceData"></cell>
          <cell :title="('保费')" :value="InsuranceAmt"></cell>
          <cell :title="('扣款方式')" :value="PayWay"></cell>
          <cell :title="('客户姓名')" :value="CstName"></cell>
          <cell :title="('是否提交')" :value="CommitType"></cell>
        </group>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      NumericalOrder: '',
      RiskName: '',
      InsuranceNumber: '',
      InsuranceCompany: '',
      InsuranceData: '',
      InsuranceAmt: '',
      PayWay: '',
      CstName: '',
      CommitType: '',
      status: ''
    }
  },
  methods: {
    refreshOption () {
      let self = this
      this.$bridge.callhandler('nativeRequest',
        JSON.stringify({
          'requstSource': 'internetRequest',
          'url': 'mstep.do?act=business',
          'params': {'method_Name': 'InsuranceHistorySearch'}
        }),
        function (response) {
          response = JSON.parse(response)
          if (response.status === 0 || response.status === '0') {
            let data = response.data.data[0]
            self.NumericalOrder = data.NumericalOrder
            self.RiskName = data.RiskName
            self.InsuranceNumber = data.InsuranceNumber
            self.InsuranceCompany = data.InsuranceCompany
            self.InsuranceData = data.InsuranceData
            self.InsuranceAmt = data.InsuranceAmt
            self.PayWay = data.PayWay
            self.CstName = data.CstName
            self.CommitType = data.CommitType
            self.status = data.status
          } else {
            console.log('fail')
          }
        }
      )
    },
    back () {
      this.$publicFun.goBack(this)
    }
  },
  created () {
    this.refreshOption()
  }
}
</script>

<style lang="less">
.InsuranceOrderHistoryQuery{
  .dy-body{
    .dltable{
      padding-top: 0.2rem;
    }
  }
}
</style>
